HAL OPAMP Types ¶
Enumerations ¶
- group OPAMP_Exported_Types_Group1
-
Enums
-
enum
hal_opamp_state_t
¶
-
HAL OPAMP state definition.
Values:
-
enumerator
HAL_OPAMP_STATE_RESET
¶
-
OPAMP not yet initialized or is de-initialized
-
enumerator
HAL_OPAMP_STATE_IDLE
¶
-
OPAMP is initialized
-
enumerator
HAL_OPAMP_STATE_CALIB
¶
-
OPAMP is being calibrated
-
enumerator
HAL_OPAMP_STATE_ACTIVE
¶
-
OPAMP is active
-
enumerator
HAL_OPAMP_STATE_RESET
¶
-
enum
hal_opamp_config_mode_t
¶
-
OPAMP configuration mode.
Values:
-
enumerator
HAL_OPAMP_MODE_STANDALONE
¶
-
OPAMP functional mode, OPAMP operation in standalone Standalone mode
-
enumerator
HAL_OPAMP_MODE_PGA
¶
-
OPAMP functional mode, OPAMP operation in PGA PGA mode
-
enumerator
HAL_OPAMP_MODE_FOLLOWER
¶
-
OPAMP functional mode, OPAMP operation in follower Follower mode
-
enumerator
HAL_OPAMP_MODE_STANDALONE
¶
-
enum
hal_opamp_pga_external_t
¶
-
OPAMP PGA external connection mode.
Values:
-
enumerator
HAL_OPAMP_PGA_EXT_NONE
¶
-
In PGA mode, the inverting input is connected to the internal feedback resistor. No external connection on inverting input. Positive gain (Non-Inverting mode) - VINPx: Input signal In PGA mode, the inverting input is connected to the internal feedback resistor. No external connection on inverting input. Positive gain (Non-Inverting mode)
VINPx: Input signal
-
enumerator
HAL_OPAMP_PGA_EXT_FILT
¶
-
In PGA mode, the inverting input is connected to the internal feedback resistor and to VINM0 for filtering. Positive gain (Non-Inverting mode) - VINPx: Input signal - VINM0 - VOUT: Additional low-pass filtering In PGA mode, the inverting input is connected to the internal feedback resistor and to VINM0 for filtering. Positive gain (Non-Inverting mode)
VINPx: Input signal
VINM0 - VOUT: Additional low-pass filtering
-
enumerator
HAL_OPAMP_PGA_EXT_BIAS
¶
-
In PGA mode, the inverting input is connected to the internal feedback resistor. VINM0 is available for bias voltage in non-inverting mode or to use the OPAMP in inverting mode. Negative gain (Inverting mode): - VINPx: Bias voltage - VINM0: Input signal Positive gain (Non-Inverting mode) - VINPx: Input signal - VINM0: Bias voltage In PGA mode, the inverting input is connected to the internal feedback resistor. VINM0 is available for bias voltage in non-inverting mode or to use theOPAMP in inverting mode. Negative gain (Inverting mode):
VINPx: Bias voltage
VINM0: Input signal Positive gain (Non-Inverting mode)
VINPx: Input signal
VINM0: Bias voltage
-
enumerator
HAL_OPAMP_PGA_EXT_BIAS_FILT
¶
-
In PGA mode, the inverting input is connected to the internal feedback resistor and to VINM1 for filtering. VINM0 is available for bias voltage in non-inverting mode or to use the OPAMP in inverting mode. Negative gain (Inverting mode): - VINPx: Bias voltage - VINM0: Input signal - VINM1 - VOUT: Additional low-pass filtering Positive gain (Non-Inverting mode) - VINPx: Input signal - VINM0: Bias voltage - VINM1 - VOUT: Additional low-pass filtering In PGA mode, the inverting input is connected to the internal feedback resistor and to VINM1 for filtering. VINM0 is available for bias voltage in non-inverting mode or to use the OPAMP in inverting mode. Negative gain (Inverting mode):
VINPx: Bias voltage
VINM0: Input signal
VINM1 - VOUT: Additional low-pass filtering Positive gain (Non-Inverting mode)
VINPx: Input signal
VINM0: Bias voltage
VINM1 - VOUT: Additional low-pass filtering
-
enumerator
HAL_OPAMP_PGA_EXT_NONE
¶
-
enum
hal_opamp_non_inverting_input_t
¶
-
OPAMP Non-inverting Input.
Values:
-
enumerator
HAL_OPAMP_NON_INVERTING_INPUT_GPIO_0
¶
-
OPAMP non-inverting input 0 connected to GPIO (for GPIO mapping, refer to datasheet parameters “OPAMPx_VINP0”) OPAMP non-inverting input 0 connected to GPIO (for GPIO mapping, refer to datasheet parameters “OPAMPx_VINP0”)
-
enumerator
HAL_OPAMP_NON_INVERTING_INPUT_GPIO_1
¶
-
OPAMP non-inverting input 1 connected to GPIO (for GPIO mapping, refer to datasheet parameters “OPAMPx_VINP1”) OPAMP non-inverting input 0 connected to GPIO (for GPIO mapping, refer to datasheet parameters “OPAMPx_VINP1”)
-
enumerator
HAL_OPAMP_NON_INVERTING_INPUT_GPIO_2
¶
-
OPAMP non-inverting input 2 connected to GPIO (for GPIO mapping, refer to datasheet parameters “OPAMPx_VINP2”) OPAMP non-inverting input 0 connected to GPIO (for GPIO mapping, refer to datasheet parameters “OPAMPx_VINP2”)
-
enumerator
HAL_OPAMP_NON_INVERTING_INPUT_DAC1_CH2
¶
-
OPAMP non-inverting input connected to DAC1 channel 2 OPAMP non-inverting input connected to DAC1 channel 2
-
enumerator
HAL_OPAMP_NON_INVERTING_INPUT_GPIO_0
¶
-
enum
hal_opamp_inverting_input_t
¶
-
OPAMP Inverting Input.
Values:
-
enumerator
HAL_OPAMP_INVERTING_INPUT_GPIO_0
¶
-
OPAMP inverting input connected to GPIO pin. Note: This OPAMP inverting input is used with OPAMP in mode standalone, PGA with external bias or filtering, PGA with inverting gain. In mode PGA, select LL_OPAMP_INPUT_INVERT_INT_PGA and configure input connection, refer to LL_OPAMP_SetPGAExternalMode(). OPAMP inverting input connected to GPIO pin. Note: This OPAMP inverting input is used with OPAMP in mode standalone, PGA with external bias or filtering, PGA with inverting gain. In mode PGA, select HAL_OPAMP_INVERTING_INPUT_INT and configure input connection, refer to HAL_OPAMP_SetPGAExternalMode().
-
enumerator
HAL_OPAMP_INVERTING_INPUT_GPIO_1
¶
-
OPAMP inverting input connected to GPIO pin. OPAMP inverting input connected to GPIO pin.
-
enumerator
HAL_OPAMP_INVERTING_INPUT_INT
¶
-
OPAMP inverting input connection depending on follower or PGA mode:
For follower or PGA without external bias or filtering, PGA without inverting gain: inverting input internally connected (not connected to a GPIO pin).
For PGA with external bias or filtering, PGA with inverting gain: inverting input connected to GPIO_0 is used. To configure input connection, refer to HAL_OPAMP_SetPGAExternalMode().
-
enumerator
HAL_OPAMP_INVERTING_INPUT_GPIO_0
¶
-
enum
hal_opamp_pga_gain_t
¶
-
OPAMP PGA Gain.
Note
Selection of PGA gain sign positive/negative, as well as external bias or filtering, is performed with function HAL_OPAMP_SetPGAExternalMode() (literals hal_opamp_pga_external_t).
Values:
-
enumerator
HAL_OPAMP_PGA_GAIN_2
¶
-
OPAMP PGA gain 2 PGA gain = x 2
-
enumerator
HAL_OPAMP_PGA_GAIN_4
¶
-
OPAMP PGA gain 4 PGA gain = x 4
-
enumerator
HAL_OPAMP_PGA_GAIN_8
¶
-
OPAMP PGA gain 8 PGA gain = x 8
-
enumerator
HAL_OPAMP_PGA_GAIN_16
¶
-
OPAMP PGA gain 16 PGA gain = x 16
-
enumerator
HAL_OPAMP_PGA_GAIN_2_OR_MINUS_1
¶
-
OPAMP PGA gain 2 or -1 PGA gain = x 2 or -1
-
enumerator
HAL_OPAMP_PGA_GAIN_4_OR_MINUS_3
¶
-
OPAMP PGA gain 4 or -3 PGA gain = x 4 or -3
-
enumerator
HAL_OPAMP_PGA_GAIN_8_OR_MINUS_7
¶
-
OPAMP PGA gain 8 or -7 PGA gain = x 8 or -7
-
enumerator
HAL_OPAMP_PGA_GAIN_16_OR_MINUS_15
¶
-
OPAMP PGA gain 16 or -15 PGA gain = x 16 or -15
-
enumerator
HAL_OPAMP_PGA_GAIN_2
¶
-
enum
hal_opamp_power_mode_t
¶
-
OPAMP power_mode.
Values:
-
enumerator
HAL_OPAMP_POWER_MODE_NORMAL
¶
-
OPAMP power mode: normal-power OPAMP in normal power mode
-
enumerator
HAL_OPAMP_POWER_MODE_NORMAL
¶
-
enum
hal_opamp_speed_mode_t
¶
-
OPAMP speed_mode.
Values:
-
enumerator
HAL_OPAMP_SPEED_MODE_NORMAL
¶
-
OPAMP speed mode: normal-speed OPAMP in normal speed mode
-
enumerator
HAL_OPAMP_SPEED_MODE_HIGH
¶
-
OPAMP speed mode: high-speed OPAMP in high speed mode
-
enumerator
HAL_OPAMP_SPEED_MODE_NORMAL
¶
-
enum
hal_opamp_trimming_mode_t
¶
-
OPAMP trimming mode.
Values:
-
enumerator
HAL_OPAMP_TRIMMING_MODE_FACTORY
¶
-
OPAMP trimming factors set to factory values Factory trimming mode
-
enumerator
HAL_OPAMP_TRIMMING_MODE_USER
¶
-
OPAMP trimming factors set to user values User trimming mode
-
enumerator
HAL_OPAMP_TRIMMING_MODE_FACTORY
¶
-
enum
hal_opamp_mux_inputs_ctrl_t
¶
-
OPAMP Timer-controlled input selection.
Values:
-
enumerator
HAL_OPAMP_MUX_INPUT_CTRL_DISABLE
¶
-
Timer-controlled input selection disabled Timer-controlled input selection disabled
-
enumerator
HAL_OPAMP_MUX_INPUT_CTRL_TIM1_OC6
¶
-
Timer-controlled input selection using TIM1 OC6 Timer-controlled input selection using TIM1 OC6
-
enumerator
HAL_OPAMP_MUX_INPUT_CTRL_TIM2_OC4
¶
-
Timer-controlled input selection using TIM2 OC4 Timer-controlled input selection using TIM2 OC4
-
enumerator
HAL_OPAMP_MUX_INPUT_CTRL_TIM12_OC1
¶
-
Timer-controlled input selection using TIM12 OC1 Timer-controlled input selection using TIM12 OC1
-
enumerator
HAL_OPAMP_MUX_INPUT_CTRL_TIM15_OC2
¶
-
Timer-controlled input selection using TIM15 OC2 Timer-controlled input selection using TIM15 OC2
-
enumerator
HAL_OPAMP_MUX_INPUT_CTRL_DISABLE
¶
-
enum
hal_opamp_mux_pga_ctrl_tim_t
¶
-
OPAMP Timer-controlled PGA mode selection.
Values:
-
enumerator
HAL_OPAMP_MUX_PGA_GAIN_CTRL_DISABLE
¶
-
Timer-controlled programmable gain selection disabled Timer-controlled pga mode selection disabled
-
enumerator
HAL_OPAMP_MUX_PGA_GAIN_CTRL_TIM1_OC6
¶
-
Timer-controlled programmable gain selection using TIM1 OC6 Timer-controlled pga mode selection using TIM1 OC6
-
enumerator
HAL_OPAMP_MUX_PGA_GAIN_CTRL_TIM2_OC4
¶
-
Timer-controlled programmable gain selection using TIM2 OC4 Timer-controlled pga mode selection using TIM2 OC4
-
enumerator
HAL_OPAMP_MUX_PGA_GAIN_CTRL_TIM12_OC2
¶
-
Timer-controlled programmable gain selection using TIM12 OC2 Timer-controlled pga mode selection using TIM12 OC2
-
enumerator
HAL_OPAMP_MUX_PGA_GAIN_CTRL_TIM15_OC2
¶
-
Timer-controlled programmable gain selection using TIM15 OC2 Timer-controlled pga mode selection using TIM15 OC2
-
enumerator
HAL_OPAMP_MUX_PGA_GAIN_CTRL_DISABLE
¶
-
enum
hal_opamp_out_connection_t
¶
-
OPAMP output connection.
Values:
-
enumerator
HAL_OPAMP_OUTPUT_CONNECTION_EXTERNAL
¶
-
OPAMP output connected to OPAMP_VOUT pin. OPAMP output connected to OPAMP_VOUT pin.
-
enumerator
HAL_OPAMP_OUTPUT_CONNECTION_INTERNAL
¶
-
OPAMP output connected internally to other peripherals (ADC, COMP, …). OPAMP output connected internally other peripherals (ADC, COMP, …).
-
enumerator
HAL_OPAMP_OUTPUT_CONNECTION_EXTERNAL
¶
-
enum
hal_opamp_state_t
¶
Handle Structure ¶
- group OPAMP_Exported_Types_Group2
-
Typedefs
-
typedef
struct
hal_opamp_handle_s
hal_opamp_handle_t
¶
-
OPAMP handle type definition
-
struct
hal_opamp_handle_s
¶
-
#include <stm32c5xx_hal_opamp.h>
OPAMP handle, contains: OPAMP instance, states.
Public Members
-
hal_opamp_t
instance
¶
-
Peripheral instance
-
volatile
hal_opamp_state_t
global_state
¶
-
OPAMP global_state
-
const
void
*
p_user_data
¶
-
User data pointer
-
hal_opamp_t
instance
¶
-
typedef
struct
hal_opamp_handle_s
hal_opamp_handle_t
¶
Configuration Structure ¶
- group OPAMP_Exported_Types_Group4
-
-
struct
hal_opamp_config_t
¶
-
#include <stm32c5xx_hal_opamp.h>
OPAMP configuration structure definition.
Public Members
-
hal_opamp_speed_mode_t
speed_mode
¶
-
The speed mode: normal-speed or high-speed
-
hal_opamp_config_mode_t
configuration_mode
¶
-
The OPAMP configuration mode: Standalone, Follower or PGA
-
hal_opamp_out_connection_t
opamp_output
¶
-
Configure the OPAMP output connection
-
hal_opamp_speed_mode_t
speed_mode
¶
-
struct
hal_opamp_config_input_connection_t
¶
-
#include <stm32c5xx_hal_opamp.h>
OPAMP input connection configuration structure definition.
Public Members
-
hal_opamp_inverting_input_t
inverting_input
¶
-
The inverting input in Standalone & PGA modes. In Follower mode this parameter is Not Applicable.
-
hal_opamp_non_inverting_input_t
non_inverting_input
¶
-
The non-inverting input of the opamp
-
hal_opamp_inverting_input_t
inverting_input
¶
-
struct
hal_opamp_trimming_offset_pair_t
¶
-
#include <stm32c5xx_hal_opamp.h>
OPAMP offset trimming pair structure definition.
Public Members
-
uint32_t
trim_offset_p
¶
-
The offset trimming value (PMOS) in normal-power mode. This parameter must be a number between Min_Data = 1 and Max_Data = 31, typical default value is 16
-
uint32_t
trim_offset_n
¶
-
The offset trimming value (NMOS) in normal-power mode. This parameter must be a number between Min_Data = 1 and Max_Data = 31, typical default value is 16
-
uint32_t
trim_offset_p
¶
-
struct
hal_opamp_config_t
¶